package impl

import (
	"sxk.games/m/v2/core/entity"
	"sxk.games/m/v2/core/utils/data"
	"sxk.games/m/v2/core/utils/data/impl"
)

type User struct {
	impl.Model
}

type Role struct {
	impl.Model
}

type Permission struct {
	impl.Model
}

type Menu struct {
	impl.Model
}

type Tenant struct {
	impl.Model
}

func (*User) Insert(user *entity.User) error {
	return data.GetDb().Create(user).Error
}

func (*User) Gets() (users []entity.User, err error) {
	err = data.GetDb().Model(&entity.User{}).Find(&users).Error
	return
}
